import time

import allure
from selenium.webdriver.common.by import By

from tests.litemall_sys.pages.basepage import BasePage
from tests.litemall_sys.pages.main_page import MainPage


class LoginPage(BasePage):
    __url = 'https://litemall.hogwarts.ceshiren.com'
    __login = (By.CSS_SELECTOR, '.el-button.el-button--primary.el-button--mini')

    def goto_mainpage(self):
        with allure.step("登录成功"):
            self.driver.get(self.__url)
            self.find_click(*self.__login)
        return MainPage(self.driver)





